package
{
	import flash.display.MovieClip;

	public class RagStick
	{
		public var p0:Vector2;
		public var p1:Vector2;
		public var w0:Number;
		public var w1:Number;
		public var minlen:Number;
		public var maxlen:Number;
		public var curlen:Number;
		public var len:Number;
		public var mc:MovieClip;
		public var flip:Number;

		public function RagStick(p0, p1, w0:Number, minratio:Number, maxlen:Number, linkage:String, scale, flip:Number)
		{
			var _local2 = scale;
			this.p0 = p0;
			this.p1 = p1;
			this.w0 = w0;
			this.w1 = 1 - this.w0;
			this.minlen = (maxlen * (_local2 / 100)) * minratio;
			this.maxlen = maxlen * (_local2 / 100);
			this.curlen = this.maxlen;
			var dx = (p0.x - p1.x);
			var _local3 = p0.y - p1.y;
			this.len = Math.sqrt((dx * dx) + (_local3 * _local3));
			this.mc = Main.getInstance().gfx.CreateSprite(linkage, NinjaGraphicsSystem.LAYER_PLAYER);
			this.mc.scaleX = _local2;
			this.mc.scaleY = _local2;
			this.flip = flip;
			this.mc.visible = false;
		}
	}
}